<?php
declare(strict_types=1);

namespace app\validate\api\admin\general;

use app\validate\api\ApiBaseValidate;

class SmsLogValidate extends ApiBaseValidate
{
    protected $ex_data = [];

    protected $rule = [
        'id' => 'require|integer',
        'channel' => 'require|max:20',
        'type' => 'require|integer',
        'phone' => 'require|mobile',
        'content' => 'require',
        'template' => 'max:32',
        'data' => 'max:512',
        'status' => 'integer',
        'fail_msg' => 'max:255',

        // 扩展
        'del_ids' => 'require|regex:ids',
    ];

    protected $message = [];

    protected $scene = [
        'delete' => ['del_ids'],
    ];
}
